package com.appwoo.txtws.service;

import android.content.Context;
import android.util.Log;
import android.util.Xml;
import com.appwoo.android.exception.NotFoundNetWorkException;
import com.appwoo.android.exception.TimeOutException;
import com.appwoo.android.util.PullIO;
import com.appwoo.txtws.bean.CallsBean;
import com.appwoo.txtws.bean.SmsBean;
import com.appwoo.txtws.bean.StateBean;
import com.appwoo.txtws.bean.UserSettingBean;
import com.appwoo.txtws.component.Logger;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;

public class SearchRecordService
{
  private String msg;

  public ArrayList<CallsBean> RQCallsSearch(String paramString1, String paramString2, String paramString3, String paramString4, int paramInt1, int paramInt2, Context paramContext)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {
    CallsBean localCallsBean = null;
    MsgService localMsgService = new MsgService();
    Object localObject1 = null;
    this.msg = ("<?xml version=\"1.0\" encoding=\"utf-8\" ?><MSG><HEAD><SNDR>" + paramString1 + "</SNDR><TYPE>RQCallRecord</TYPE>" + "</HEAD><BODY><BID>" + paramString2 + "</BID><CallDate>" + paramString3 + "</CallDate><CallEndDate>" + paramString4 + "</CallEndDate><PageIndex>" + paramInt1 + "</PageIndex><PageSize>" + paramInt2 + "</PageSize></BODY></MSG>");
    String str = localMsgService.sendMessage(paramString1, this.msg, paramContext);
    Object localObject2 = Xml.newPullParser();
    int i;
    try
    {
      XmlPullParser localXmlPullParser = PullIO.getPullByString(str);
      localObject2 = localXmlPullParser;
      i = ((XmlPullParser)localObject2).getEventType();
      if (i == 1)
        return localObject1;
    }
    catch (NullPointerException localNullPointerException)
    {
      while (true)
        localNullPointerException.printStackTrace();
      switch (i)
      {
      case 1:
      default:
      case 0:
      case 2:
      case 3:
      }
    }
    while (true)
    {
      i = ((XmlPullParser)localObject2).next();
      break;
      localObject1 = new ArrayList();
      continue;
      if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("List"))
        localCallsBean = new CallsBean();
      if (localCallsBean != null)
        if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("phoneno"))
        {
          localCallsBean.setCno(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("personname"))
        {
          localCallsBean.setCname(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("calltype"))
        {
          localCallsBean.setCtype(Integer.valueOf(((XmlPullParser)localObject2).nextText()).intValue());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("duration"))
        {
          localCallsBean.setCduration(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("id"))
        {
          localCallsBean.setId(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("calltime"))
        {
          localCallsBean.setCtime(((XmlPullParser)localObject2).nextText());
          continue;
          if ((((XmlPullParser)localObject2).getName().equalsIgnoreCase("List")) && (localObject1 != null) && (localCallsBean != null))
          {
            ((ArrayList)localObject1).add(localCallsBean);
            localCallsBean = null;
          }
        }
    }
  }

  public ArrayList<CallsBean> RQCallsTimes(String paramString1, String paramString2, int paramInt1, int paramInt2, Context paramContext)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {
    CallsBean localCallsBean = null;
    MsgService localMsgService = new MsgService();
    Object localObject1 = null;
    this.msg = ("<?xml version=\"1.0\" encoding=\"utf-8\" ?><MSG><HEAD><SNDR>" + paramString1 + "</SNDR><TYPE>RQCalls</TYPE>" + "</HEAD><BODY><BID>" + paramString2 + "</BID>" + "<PageIndex>" + paramInt1 + "</PageIndex><PageSize>" + paramInt2 + "</PageSize></BODY></MSG>");
    String str = localMsgService.sendMessage(paramString1, this.msg, paramContext);
    Object localObject2 = Xml.newPullParser();
    int i;
    try
    {
      XmlPullParser localXmlPullParser = PullIO.getPullByString(str);
      localObject2 = localXmlPullParser;
      i = ((XmlPullParser)localObject2).getEventType();
      if (i == 1)
        return localObject1;
    }
    catch (NullPointerException localNullPointerException)
    {
      while (true)
        localNullPointerException.printStackTrace();
      switch (i)
      {
      case 1:
      default:
      case 0:
      case 2:
      case 3:
      }
    }
    while (true)
    {
      i = ((XmlPullParser)localObject2).next();
      break;
      localObject1 = new ArrayList();
      continue;
      if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("List"))
        localCallsBean = new CallsBean();
      if (localCallsBean != null)
        if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("phoneno"))
        {
          localCallsBean.setCno(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("personname"))
        {
          localCallsBean.setCname(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("calltimes"))
        {
          localCallsBean.setCtimes(((XmlPullParser)localObject2).nextText());
          continue;
          if ((((XmlPullParser)localObject2).getName().equalsIgnoreCase("List")) && (localObject1 != null) && (localCallsBean != null))
          {
            ((ArrayList)localObject1).add(localCallsBean);
            localCallsBean = null;
          }
        }
    }
  }

  public ArrayList<SmsBean> RQSmsSearch(String paramString1, String paramString2, String paramString3, String paramString4, int paramInt1, int paramInt2, Context paramContext)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {
    SmsBean localSmsBean = null;
    MsgService localMsgService = new MsgService();
    Object localObject1 = null;
    this.msg = ("<?xml version=\"1.0\" encoding=\"utf-8\" ?><MSG><HEAD><SNDR>" + paramString1 + "</SNDR><TYPE>RQSmsRecord</TYPE>" + "</HEAD><BODY><BID>" + paramString2 + "</BID><SmsDate>" + paramString3 + "</SmsDate><SmsEndDate>" + paramString4 + "</SmsEndDate><PageIndex>" + paramInt1 + "</PageIndex><PageSize>" + paramInt2 + "</PageSize></BODY></MSG>");
    String str = localMsgService.sendMessage(paramString1, this.msg, paramContext);
    Object localObject2 = Xml.newPullParser();
    int i;
    try
    {
      XmlPullParser localXmlPullParser = PullIO.getPullByString(str);
      localObject2 = localXmlPullParser;
      i = ((XmlPullParser)localObject2).getEventType();
      if (i == 1)
        return localObject1;
    }
    catch (NullPointerException localNullPointerException)
    {
      while (true)
        localNullPointerException.printStackTrace();
      switch (i)
      {
      case 1:
      default:
      case 0:
      case 2:
      case 3:
      }
    }
    while (true)
    {
      i = ((XmlPullParser)localObject2).next();
      break;
      localObject1 = new ArrayList();
      continue;
      if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("List"))
        localSmsBean = new SmsBean();
      if (localSmsBean != null)
        if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("phoneno"))
        {
          localSmsBean.setSno(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("personname"))
        {
          localSmsBean.setSname(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("smstype"))
        {
          localSmsBean.setStype(Integer.parseInt(((XmlPullParser)localObject2).nextText()));
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("content"))
        {
          localSmsBean.setScontent(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("SmsTime"))
        {
          localSmsBean.setStime(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("id"))
        {
          localSmsBean.setId(((XmlPullParser)localObject2).nextText());
          continue;
          if ((((XmlPullParser)localObject2).getName().equalsIgnoreCase("List")) && (localObject1 != null) && (localSmsBean != null))
          {
            ((ArrayList)localObject1).add(localSmsBean);
            localSmsBean = null;
          }
        }
    }
  }

  public ArrayList<SmsBean> RQSmsTimes(String paramString1, String paramString2, int paramInt1, int paramInt2, Context paramContext)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {
    SmsBean localSmsBean = null;
    MsgService localMsgService = new MsgService();
    Object localObject1 = null;
    this.msg = ("<?xml version=\"1.0\" encoding=\"utf-8\" ?><MSG><HEAD><SNDR>" + paramString1 + "</SNDR> <TYPE>RQSmss</TYPE>" + "</HEAD><BODY><BID>" + paramString2 + "</BID>" + "<PageIndex>" + paramInt1 + "</PageIndex><PageSize>" + paramInt2 + "</PageSize></BODY></MSG>");
    String str = localMsgService.sendMessage(paramString1, this.msg, paramContext);
    Object localObject2 = Xml.newPullParser();
    int i;
    try
    {
      XmlPullParser localXmlPullParser = PullIO.getPullByString(str);
      localObject2 = localXmlPullParser;
      i = ((XmlPullParser)localObject2).getEventType();
      if (i == 1)
        return localObject1;
    }
    catch (NullPointerException localNullPointerException)
    {
      while (true)
        localNullPointerException.printStackTrace();
      switch (i)
      {
      case 1:
      default:
      case 0:
      case 2:
      case 3:
      }
    }
    while (true)
    {
      i = ((XmlPullParser)localObject2).next();
      break;
      localObject1 = new ArrayList();
      continue;
      if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("List"))
        localSmsBean = new SmsBean();
      if (localSmsBean != null)
        if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("phoneno"))
        {
          localSmsBean.setSno(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("personname"))
        {
          localSmsBean.setSname(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("smstype"))
        {
          localSmsBean.setStype(Integer.parseInt(((XmlPullParser)localObject2).nextText()));
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("content"))
        {
          localSmsBean.setScontent(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("SmsTimes"))
        {
          localSmsBean.setStimes(((XmlPullParser)localObject2).nextText());
          continue;
          if ((((XmlPullParser)localObject2).getName().equalsIgnoreCase("List")) && (localObject1 != null) && (localSmsBean != null))
          {
            ((ArrayList)localObject1).add(localSmsBean);
            localSmsBean = null;
          }
        }
    }
  }

  public List<UserSettingBean> RQUserSettingSwitch(String paramString1, String paramString2, String paramString3, Context paramContext)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {
    Object localObject1 = null;
    UserSettingBean localUserSettingBean = null;
    MsgService localMsgService = new MsgService();
    String str1 = "<MSG><HEAD><SNDR>" + paramString1 + "</SNDR><TYPE>" + "RQUserSetting</TYPE></HEAD>" + "<BODY>" + "<Equipid>" + paramString2 + "</Equipid>" + "<ParaName>" + paramString3 + "</ParaName>" + "</BODY></MSG>";
    Log.i("xjf", "--RQUserSetting,,,msg--" + str1);
    String str2 = localMsgService.sendMessage(paramString1, str1, paramContext);
    Log.i("xjf", "--RQUserSetting,,,str--" + str2);
    Object localObject2 = Xml.newPullParser();
    int i;
    try
    {
      XmlPullParser localXmlPullParser = PullIO.getPullByString(str2);
      localObject2 = localXmlPullParser;
      i = ((XmlPullParser)localObject2).getEventType();
      if (i == 1)
        return localObject1;
    }
    catch (NullPointerException localNullPointerException)
    {
      while (true)
        localNullPointerException.printStackTrace();
      switch (i)
      {
      case 1:
      default:
      case 0:
      case 2:
      case 3:
      }
    }
    while (true)
    {
      i = ((XmlPullParser)localObject2).next();
      break;
      localObject1 = new ArrayList();
      continue;
      if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("List"))
        localUserSettingBean = new UserSettingBean();
      if (localUserSettingBean != null)
        if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("ParaName"))
        {
          localUserSettingBean.setParaName(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("ParaValue"))
        {
          localUserSettingBean.setParaVal(((XmlPullParser)localObject2).nextText());
          continue;
          if ((((XmlPullParser)localObject2).getName().equalsIgnoreCase("list")) && (localObject1 != null) && (localUserSettingBean != null))
          {
            ((List)localObject1).add(localUserSettingBean);
            localUserSettingBean = null;
          }
        }
    }
  }

  public StateBean UDUserSetting(String paramString1, String paramString2, String paramString3, String paramString4, String paramString5, Context paramContext)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {
    StateBean localStateBean = new StateBean();
    MsgService localMsgService = new MsgService();
    String str1 = "<MSG><HEAD><SNDR>" + paramString1 + "</SNDR><TYPE>" + "UDUserSetting</TYPE></HEAD>" + "<BODY>" + "<List><Equipid>" + paramString2 + "</Equipid>" + "<ParaName>" + paramString3 + "</ParaName>" + "<ParaValue>" + paramString4 + "</ParaValue>" + "<ParaType>" + paramString5 + "</ParaType></List>" + "</BODY></MSG>";
    Logger.i("xjf", "--UDUserSetting,,,msg--" + str1);
    String str2 = localMsgService.sendMessage(paramString1, str1, paramContext);
    Logger.i("xjf", "--UDUserSetting,,,str--" + str2);
    Object localObject = Xml.newPullParser();
    int i;
    try
    {
      XmlPullParser localXmlPullParser = PullIO.getPullByString(str2);
      localObject = localXmlPullParser;
      i = ((XmlPullParser)localObject).getEventType();
      if (i == 1)
        return localStateBean;
    }
    catch (NullPointerException localNullPointerException)
    {
      while (true)
        localNullPointerException.printStackTrace();
      switch (i)
      {
      case 1:
      default:
      case 0:
      case 2:
      }
    }
    while (true)
    {
      i = ((XmlPullParser)localObject).next();
      break;
      localStateBean = new StateBean();
      continue;
      if (((XmlPullParser)localObject).getName().equalsIgnoreCase("Code"))
        localStateBean.setCode(((XmlPullParser)localObject).nextText());
      else if (((XmlPullParser)localObject).getName().equalsIgnoreCase("Desc"))
        localStateBean.setDesc(((XmlPullParser)localObject).nextText());
    }
  }

  public StateBean addCallsList(String paramString1, String paramString2, ArrayList<CallsBean> paramArrayList, Context paramContext)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {
    StateBean localStateBean = new StateBean();
    String str1 = "";
    System.out.println(paramArrayList.size() + "----222222222222222222222");
    Iterator localIterator = paramArrayList.iterator();
    Object localObject;
    int j;
    while (true)
    {
      String str7;
      if (!localIterator.hasNext())
      {
        System.out.println(str1);
        MsgService localMsgService = new MsgService();
        String str6 = "<MSG><HEAD><SNDR>" + paramString1 + "</SNDR><TYPE>ADCallRecord</TYPE>" + "</HEAD><BODY><BID>" + paramString2 + "</BID>" + str1 + "</BODY></MSG>";
        Log.i("xjf", "--addCalls,,,msg--" + str6);
        str7 = localMsgService.sendMessage(paramString1, str6, paramContext);
        Log.i("xjf", "--addCalls,,,str--" + str7);
        localObject = Xml.newPullParser();
      }
      try
      {
        XmlPullParser localXmlPullParser = PullIO.getPullByString(str7);
        localObject = localXmlPullParser;
        j = ((XmlPullParser)localObject).getEventType();
        if (j == 1)
        {
          return localStateBean;
          CallsBean localCallsBean = (CallsBean)localIterator.next();
          String str2 = localCallsBean.getCno();
          String str3 = localCallsBean.getCname();
          int i = localCallsBean.getCtype();
          String str4 = localCallsBean.getCtime();
          String str5 = localCallsBean.getCduration();
          str1 = str1 + "<List>" + "<PhoneNo>" + str2 + "</PhoneNo>" + "<PersonName>" + str3 + "</PersonName>" + "<CallType>" + i + "</CallType>" + "<CallTime>" + str4 + "</CallTime>" + "<Duration>" + str5 + "</Duration>" + "</List>";
        }
      }
      catch (NullPointerException localNullPointerException)
      {
        while (true)
          localNullPointerException.printStackTrace();
        switch (j)
        {
        case 1:
        default:
        case 0:
        case 2:
        }
      }
    }
    while (true)
    {
      j = ((XmlPullParser)localObject).next();
      break;
      localStateBean = new StateBean();
      continue;
      if (((XmlPullParser)localObject).getName().equalsIgnoreCase("Code"))
        localStateBean.setCode(((XmlPullParser)localObject).nextText());
      else if (((XmlPullParser)localObject).getName().equalsIgnoreCase("Desc"))
        localStateBean.setDesc(((XmlPullParser)localObject).nextText());
    }
  }

  public StateBean addSmsList(String paramString1, String paramString2, ArrayList<SmsBean> paramArrayList, Context paramContext)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {
    StateBean localStateBean = new StateBean();
    String str1 = "";
    Iterator localIterator = paramArrayList.iterator();
    Object localObject;
    int i;
    while (true)
    {
      String str3;
      if (!localIterator.hasNext())
      {
        MsgService localMsgService = new MsgService();
        String str2 = "<MSG><HEAD><SNDR>" + paramString1 + "</SNDR><TYPE>ADSmsRecord</TYPE>" + "</HEAD><BODY><BID>" + paramString2 + "</BID>" + str1 + "</BODY></MSG>";
        Log.i("xjf", "--addSms,,,msg--" + str2);
        str3 = localMsgService.sendMessage(paramString1, str2, paramContext);
        Log.i("xjf", "--addSms,,,str--" + str3);
        localObject = Xml.newPullParser();
      }
      try
      {
        XmlPullParser localXmlPullParser = PullIO.getPullByString(str3);
        localObject = localXmlPullParser;
        i = ((XmlPullParser)localObject).getEventType();
        if (i == 1)
        {
          return localStateBean;
          SmsBean localSmsBean = (SmsBean)localIterator.next();
          String str4 = localSmsBean.getSno();
          String str5 = localSmsBean.getSname();
          int j = localSmsBean.getStype();
          String str6 = localSmsBean.getStime();
          String str7 = localSmsBean.getScontent();
          str1 = str1 + "<List>" + "<PhoneNo>" + str4 + "</PhoneNo>" + "<PersonName>" + str5 + "</PersonName>" + "<SmsType>" + j + "</SmsType>" + "<Content>" + str7 + "</Content>" + "<SmsTime>" + str6 + "</SmsTime>" + "</List>";
        }
      }
      catch (NullPointerException localNullPointerException)
      {
        while (true)
          localNullPointerException.printStackTrace();
        switch (i)
        {
        case 1:
        default:
        case 0:
        case 2:
        }
      }
    }
    while (true)
    {
      i = ((XmlPullParser)localObject).next();
      break;
      localStateBean = new StateBean();
      continue;
      if (((XmlPullParser)localObject).getName().equalsIgnoreCase("Code"))
        localStateBean.setCode(((XmlPullParser)localObject).nextText());
      else if (((XmlPullParser)localObject).getName().equalsIgnoreCase("Desc"))
        localStateBean.setDesc(((XmlPullParser)localObject).nextText());
    }
  }

  public StateBean delRecordList(String paramString1, String paramString2, Map<String, Integer> paramMap, String paramString3, Context paramContext)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {
    StateBean localStateBean = new StateBean();
    String str1 = "<MSG><HEAD><SNDR>" + paramString1 + "</SNDR> " + "<TYPE>" + paramString3 + "</TYPE></HEAD>" + "<BODY>" + "<BID>" + paramString2 + "</BID>";
    Iterator localIterator = paramMap.keySet().iterator();
    Object localObject1;
    int i;
    while (true)
    {
      String str3;
      if (!localIterator.hasNext())
      {
        MsgService localMsgService = new MsgService();
        String str2 = str1 + "</BODY></MSG>";
        new MsgService();
        Logger.v("io", "msg+=" + str2);
        Log.i("xjf", "--delCalls,,,msg--" + str2);
        str3 = localMsgService.sendMessage(paramString1, str2, paramContext);
        Log.i("xjf", "--delCalls,,,str--" + str3);
        localObject1 = Xml.newPullParser();
      }
      try
      {
        XmlPullParser localXmlPullParser = PullIO.getPullByString(str3);
        localObject1 = localXmlPullParser;
        i = ((XmlPullParser)localObject1).getEventType();
        if (i == 1)
        {
          return localStateBean;
          Object localObject2 = localIterator.next();
          str1 = str1 + "<List><ID>" + paramMap.get(localObject2) + "</ID>" + "</List>";
        }
      }
      catch (NullPointerException localNullPointerException)
      {
        while (true)
          localNullPointerException.printStackTrace();
        switch (i)
        {
        case 1:
        default:
        case 0:
        case 2:
        }
      }
    }
    while (true)
    {
      i = ((XmlPullParser)localObject1).next();
      break;
      localStateBean = new StateBean();
      continue;
      if (((XmlPullParser)localObject1).getName().equalsIgnoreCase("Code"))
        localStateBean.setCode(((XmlPullParser)localObject1).nextText());
      else if (((XmlPullParser)localObject1).getName().equalsIgnoreCase("Desc"))
        localStateBean.setDesc(((XmlPullParser)localObject1).nextText());
    }
  }

  public StateBean delRecordLists(String paramString1, String paramString2, Map<String, String> paramMap, String paramString3, Context paramContext)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {
    StateBean localStateBean = new StateBean();
    String str1 = "<MSG><HEAD><SNDR>" + paramString1 + "</SNDR> " + "<TYPE>" + paramString3 + "</TYPE></HEAD>" + "<BODY>" + "<BID>" + paramString2 + "</BID>";
    Iterator localIterator = paramMap.keySet().iterator();
    Object localObject1;
    int i;
    while (true)
    {
      String str3;
      if (!localIterator.hasNext())
      {
        MsgService localMsgService = new MsgService();
        String str2 = str1 + "</BODY></MSG>";
        new MsgService();
        Logger.v("io", "msg+=" + str2);
        Log.i("xjf", "--delCalls,,,msg--" + str2);
        str3 = localMsgService.sendMessage(paramString1, str2, paramContext);
        Log.i("xjf", "--delCalls,,,str--" + str3);
        localObject1 = Xml.newPullParser();
      }
      try
      {
        XmlPullParser localXmlPullParser = PullIO.getPullByString(str3);
        localObject1 = localXmlPullParser;
        i = ((XmlPullParser)localObject1).getEventType();
        if (i == 1)
        {
          return localStateBean;
          Object localObject2 = localIterator.next();
          str1 = str1 + "<List><PhoneNo>" + (String)paramMap.get(localObject2) + "</PhoneNo>" + "</List>";
        }
      }
      catch (NullPointerException localNullPointerException)
      {
        while (true)
          localNullPointerException.printStackTrace();
        switch (i)
        {
        case 1:
        default:
        case 0:
        case 2:
        }
      }
    }
    while (true)
    {
      i = ((XmlPullParser)localObject1).next();
      break;
      localStateBean = new StateBean();
      continue;
      if (((XmlPullParser)localObject1).getName().equalsIgnoreCase("Code"))
        localStateBean.setCode(((XmlPullParser)localObject1).nextText());
      else if (((XmlPullParser)localObject1).getName().equalsIgnoreCase("Desc"))
        localStateBean.setDesc(((XmlPullParser)localObject1).nextText());
    }
  }

  public ArrayList<CallsBean> getCallsList(String paramString1, String paramString2, String paramString3, String paramString4, int paramInt1, int paramInt2, Context paramContext)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {
    CallsBean localCallsBean = null;
    MsgService localMsgService = new MsgService();
    Object localObject1 = null;
    if ((paramString3 == null) && (paramString4 == null))
      this.msg = ("<?xml version=\"1.0\" encoding=\"utf-8\" ?><MSG><HEAD><SNDR>" + paramString1 + "</SNDR><TYPE>RQCallRecord</TYPE>" + "</HEAD><BODY><BID>" + paramString2 + "</BID><PhoneNo>" + "</PhoneNo><CallDate>" + "</CallDate><PageIndex>" + paramInt1 + "</PageIndex><PageSize>" + paramInt2 + "</PageSize></BODY></MSG>");
    Object localObject2;
    int i;
    while (true)
    {
      String str = localMsgService.sendMessage(paramString1, this.msg, paramContext);
      localObject2 = Xml.newPullParser();
      try
      {
        XmlPullParser localXmlPullParser = PullIO.getPullByString(str);
        localObject2 = localXmlPullParser;
        i = ((XmlPullParser)localObject2).getEventType();
        if (i == 1)
        {
          return localObject1;
          if ((paramString3 == null) && (paramString4 != null))
          {
            this.msg = ("<?xml version=\"1.0\" encoding=\"utf-8\" ?><MSG><HEAD><SNDR>" + paramString1 + "</SNDR><TYPE>RQCallRecord</TYPE>" + "</HEAD><BODY><BID>" + paramString2 + "</BID><PhoneNo>" + "</PhoneNo><CallDate>" + paramString4 + "</CallDate><PageIndex>" + paramInt1 + "</PageIndex><PageSize>" + paramInt2 + "</PageSize></BODY></MSG>");
            continue;
          }
          if ((paramString3 != null) && (paramString4 == null))
          {
            this.msg = ("<?xml version=\"1.0\" encoding=\"utf-8\" ?><MSG><HEAD><SNDR>" + paramString1 + "</SNDR><TYPE>RQCallRecord</TYPE>" + "</HEAD><BODY><BID>" + paramString2 + "</BID><PhoneNo>" + paramString3 + "</PhoneNo><CallDate>" + "</CallDate><PageIndex>" + paramInt1 + "</PageIndex><PageSize>" + paramInt2 + "</PageSize></BODY></MSG>");
            continue;
          }
          if ((paramString3 == null) || (paramString4 == null))
            continue;
          this.msg = ("<?xml version=\"1.0\" encoding=\"utf-8\" ?><MSG><HEAD><SNDR>" + paramString1 + "</SNDR><TYPE>RQCallRecord</TYPE>" + "</HEAD><BODY><BID>" + paramString2 + "</BID><PhoneNo>" + paramString3 + "</PhoneNo><CallDate>" + paramString4 + "</CallDate><PageIndex>" + paramInt1 + "</PageIndex><PageSize>" + paramInt2 + "</PageSize></BODY></MSG>");
        }
      }
      catch (NullPointerException localNullPointerException)
      {
        while (true)
          localNullPointerException.printStackTrace();
        switch (i)
        {
        case 1:
        default:
        case 0:
        case 2:
        case 3:
        }
      }
    }
    while (true)
    {
      i = ((XmlPullParser)localObject2).next();
      break;
      localObject1 = new ArrayList();
      continue;
      if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("List"))
        localCallsBean = new CallsBean();
      if (localCallsBean != null)
        if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("phoneno"))
        {
          localCallsBean.setCno(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("personname"))
        {
          localCallsBean.setCname(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("calltype"))
        {
          localCallsBean.setCtype(Integer.parseInt(((XmlPullParser)localObject2).nextText()));
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("calltime"))
        {
          localCallsBean.setCtime(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("duration"))
        {
          localCallsBean.setCduration(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("id"))
        {
          localCallsBean.setId(((XmlPullParser)localObject2).nextText());
          continue;
          if ((((XmlPullParser)localObject2).getName().equalsIgnoreCase("List")) && (localObject1 != null) && (localCallsBean != null))
          {
            ((ArrayList)localObject1).add(localCallsBean);
            localCallsBean = null;
          }
        }
    }
  }

  public ArrayList<SmsBean> getSmsList(String paramString1, String paramString2, String paramString3, String paramString4, int paramInt1, int paramInt2, Context paramContext)
    throws IOException, XmlPullParserException, TimeOutException, NotFoundNetWorkException
  {
    SmsBean localSmsBean = null;
    MsgService localMsgService = new MsgService();
    Object localObject1 = null;
    if ((paramString3 != null) && (paramString4 != null))
      this.msg = ("<?xml version=\"1.0\" encoding=\"utf-8\" ?><MSG><HEAD><SNDR>" + paramString1 + "</SNDR> <TYPE>RQSmsRecord</TYPE>" + "</HEAD><BODY><BID>" + paramString2 + "</BID><PhoneNo>" + paramString3 + "</PhoneNo><SmsDate>" + paramString4 + "</SmsDate><PageIndex>" + paramInt1 + "</PageIndex><PageSize>" + paramInt2 + "</PageSize></BODY></MSG>");
    Object localObject2;
    int i;
    while (true)
    {
      String str = localMsgService.sendMessage(paramString1, this.msg, paramContext);
      localObject2 = Xml.newPullParser();
      try
      {
        XmlPullParser localXmlPullParser = PullIO.getPullByString(str);
        localObject2 = localXmlPullParser;
        i = ((XmlPullParser)localObject2).getEventType();
        if (i == 1)
        {
          return localObject1;
          if ((paramString3 != null) && (paramString4 == null))
          {
            this.msg = ("<?xml version=\"1.0\" encoding=\"utf-8\" ?><MSG><HEAD><SNDR>" + paramString1 + "</SNDR> <TYPE>RQSmsRecord</TYPE>" + "</HEAD><BODY><BID>" + paramString2 + "</BID><PhoneNo>" + paramString3 + "</PhoneNo><SmsDate>" + "</SmsDate><PageIndex>" + paramInt1 + "</PageIndex><PageSize>" + paramInt2 + "</PageSize></BODY></MSG>");
            continue;
          }
          if ((paramString3 == null) && (paramString4 != null))
          {
            this.msg = ("<?xml version=\"1.0\" encoding=\"utf-8\" ?><MSG><HEAD><SNDR>" + paramString1 + "</SNDR> <TYPE>RQSmsRecord</TYPE>" + "</HEAD><BODY><BID>" + paramString2 + "</BID><PhoneNo>" + "</PhoneNo><SmsDate>" + paramString4 + "</SmsDate><PageIndex>" + paramInt1 + "</PageIndex><PageSize>" + paramInt2 + "</PageSize></BODY></MSG>");
            continue;
          }
          if ((paramString3 != null) || (paramString4 != null))
            continue;
          this.msg = ("<?xml version=\"1.0\" encoding=\"utf-8\" ?><MSG><HEAD><SNDR>" + paramString1 + "</SNDR> <TYPE>RQSmsRecord</TYPE>" + "</HEAD><BODY><BID>" + paramString2 + "</BID><PhoneNo>" + "</PhoneNo><SmsDate>" + "</SmsDate><PageIndex>" + paramInt1 + "</PageIndex><PageSize>" + paramInt2 + "</PageSize></BODY></MSG>");
        }
      }
      catch (NullPointerException localNullPointerException)
      {
        while (true)
          localNullPointerException.printStackTrace();
        switch (i)
        {
        case 1:
        default:
        case 0:
        case 2:
        case 3:
        }
      }
    }
    while (true)
    {
      i = ((XmlPullParser)localObject2).next();
      break;
      localObject1 = new ArrayList();
      continue;
      if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("List"))
        localSmsBean = new SmsBean();
      if (localSmsBean != null)
        if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("phoneno"))
        {
          localSmsBean.setSno(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("personname"))
        {
          localSmsBean.setSname(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("smstype"))
        {
          localSmsBean.setStype(Integer.parseInt(((XmlPullParser)localObject2).nextText()));
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("smstime"))
        {
          localSmsBean.setStime(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("content"))
        {
          localSmsBean.setScontent(((XmlPullParser)localObject2).nextText());
        }
        else if (((XmlPullParser)localObject2).getName().equalsIgnoreCase("id"))
        {
          localSmsBean.setId(((XmlPullParser)localObject2).nextText());
          continue;
          if ((((XmlPullParser)localObject2).getName().equalsIgnoreCase("List")) && (localObject1 != null) && (localSmsBean != null))
          {
            ((ArrayList)localObject1).add(localSmsBean);
            localSmsBean = null;
          }
        }
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.service.SearchRecordService
 * JD-Core Version:    0.6.2
 */